package com.zyc.webtest.service.impl;

import com.zyc.webtest.dao.SysUserRepository;
import com.zyc.webtest.domain.SysUserEntity;
import com.zyc.webtest.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;

import java.util.Optional;


@Service("sysUserService")
public class SysUserServiceImpl extends BaseServiceImpl<SysUserEntity,Long> implements SysUserService {

    @Autowired
    private SysUserRepository sysUserRepository;

    @Override
    public JpaRepository getDao() {
        return sysUserRepository;
    }


    @Override
    public Optional<SysUserEntity> findUserByUsername(String userName) {
        return sysUserRepository.findUserByUserName(userName);
    }
}
